//
//  MyReservationResModel.swift
//  koolcar
//
//  Created by xiantian on 2023/11/20.
//

import UIKit
import ObjectMapper

class MyReservationResModel: Mappable {
    var code: String?
    var msg: String?
    var data: MyReservationDataModel?
    func mapping(map: Map) {
        code <- map["code"]
        msg <- map["msg"]
        data <- map["data"]
    }
    required init?(map: Map) {
        
    }
}


class MyReservationDataModel: Mappable {
    var content : [MyReservationContentModel]?
    var pageNumber : Int?
    var pageSize : Int?
    var total : Int?
    func mapping(map: Map) {
        content <- map["content"]
        pageNumber <- map["pageNumber"]
        pageSize <- map["pageSize"]
        total <- map["total"]
        
    }
    required init?(map: Map) {
        
    }
}

class MyReservationContentModel: Mappable {
    var carNumber : String?
    var createdTime : String?
    var delFlag : Int?
    var endTime : String?
    var id : Int?
    var joinDate : String?
    var memberAccount : String?
    var memberId : Int?
    var modifyTime : String?
    var orderNo : String?
    var quantity : Int?
    var serverId : Int?
    var serviceName : String?
    var slotId : Int?
    var startTime : String?
    var status : Int?
    var storeId : Int?
    var version : Int?
    var urlPicture: String?
    
    var cancelBlock: (()->Void)? //取消预约block
    func mapping(map: Map) {
        carNumber <- map["carNumber"]
        createdTime <- map["createdTime"]
        delFlag <- map["delFlag"]
        endTime <- map["endTime"]
        id <- map["id"]
        joinDate <- map["joinDate"]
        memberAccount <- map["memberAccount"]
        memberId <- map["memberId"]
        modifyTime <- map["modifyTime"]
        orderNo <- map["orderNo"]
        quantity <- map["quantity"]
        serverId <- map["serverId"]
        serviceName <- map["serviceName"]
        slotId <- map["slotId"]
        startTime <- map["startTime"]
        status <- map["status"]
        storeId <- map["storeId"]
        version <- map["version"]
        urlPicture <- map["urlPicture"]
        
    }
    required init?(map: Map) {
        
    }
}
